/*
 * Copyright (c) 2016. Naivor.All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.myapplication.base.mvp;

/**
 * BaseUiView 是应用中所有UiView的顶级抽象类，适合抽取UiView的公共方法和属性
 * <p>
 * UiView：MVP架构中的V。
 * <p>
 */
public interface IBaseUiView {


    //#######################################################  LoadingDialog   ####################################################
    /**
     * showLoading 方法主要用于页面请求数据时显示加载状态
     */
    void showLoadingDialog();

    /**
     *
     * @param timeout
     */
    void showLoadingDialogNow(boolean timeout);

    /**
     *  用于请求数据完成关闭loading
     */
    void dismissLoadingDialog();



    //#######################################################  Toast  ####################################################

    /**
     * showErrorMsg 方法用于请求数据出错
     */
    void showErrorMsg(int errorCode,String msg);

    /**
     * Toast
     * @param message
     */
    void showToast(String message);




    //#######################################################   空数据  ####################################################
    /**
     * showEmpty 方法用于请求的数据为空的状态
     */
    void showEmptyView();


    //#######################################################   网络错误   ####################################################

    /**
     * 用于显示网络错误布局
     */
    void showErrorView();


    void showNoMoreView();


}

